feat(api): implement backend/frontend license system for CLI Phase 3#19
Merged
davidlu1001 merged 3 commits intomainfrom Jan 20, 2026
Merged
Conversation
This commit implements the complete backend infrastructure for the CLI Phase 3 license system with Ed25519 signing and offline validation support. Changes: - Add Ed25519 license blob signing (lib/ed25519.ts) - Cryptographic signing using Ed25519 keys - Base64URL encoded payload.signature format - Key generation utilities for initial setup - Add fingerprint detection module (lib/fingerprint.ts) - Support for machine/ci/container fingerprint types - Auto-detection from machine_info metadata - Display helpers for dashboard - Update PLAN_LIMITS with offline_grace_days - COMMUNITY: 0 days (must be online) - PRO: 7 days - TEAM: 14 days - SOVEREIGN: 365 days (air-gap support) - Update API handlers to return license_blob - activate-license.ts: Generate signed blob on activation - validate-license.ts: Return signed blob for caching - Update API types - Add machine_fingerprint, fingerprint_type fields - Add license_blob to responses - Add offline_grace_days to ExtendedLimits - Add database migration (010_fingerprint_type.sql) - fingerprint_type column - ci_provider, ci_repo columns - container_type column - Update db.ts registerMachine function - Accept fingerprint type and metadata - Store CI/container metadata
This commit adds frontend components for license management and device tracking, complementing the backend license system. New files: - types/license.ts: Type definitions for fingerprints, license details - lib/api.ts: API client for license operations - components/fingerprint-badge.tsx: Device type badges (machine/ci/container) - components/license-card.tsx: License details display - components/device-list.tsx: Device management with deactivation - components/grace-period-info.tsx: Offline grace period display - components/license-summary-card.tsx: Dashboard license overview - components/device-summary-card.tsx: Dashboard device overview - app/dashboard/license/page.tsx: License details page Updated files: - app/dashboard/page.tsx: Integrated license & device components - lib/pricing.ts: Added offlineGraceDays to all plans - Community: 0 days (online required) - Pro: 7 days - Team: 14 days - Sovereign: 365 days (air-gap support) Features: - View license details with plan, status, expiration - See offline grace period and upgrade hints - Manage activated devices with fingerprint type icons - Deactivate devices from the dashboard
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Split into ADD COLUMN + CREATE UNIQUE INDEX
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This commit implements the complete backend infrastructure for the CLI
Phase 3 license system with Ed25519 signing and offline validation support.
Changes:
Add Ed25519 license blob signing (lib/ed25519.ts)
Add fingerprint detection module (lib/fingerprint.ts)
Update PLAN_LIMITS with offline_grace_days
Update API handlers to return license_blob
Update API types
Add database migration (010_fingerprint_type.sql)
Update db.ts registerMachine function
feat(web): implement license dashboard for CLI Phase 3
This commit adds frontend components for license management and device
tracking, complementing the backend license system.
New files:
Updated files:
Features: